package my.presentation;

import boundary.PizzaFacade;
import entities.Pizza;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;


@ManagedBean(name="PizzaView")
@RequestScoped
public class PizzaView {
    
    @EJB
    private PizzaFacade pizzaFacade;

    // Creates a new field
    private Pizza pizza;


    public PizzaView() {
        this.pizza = new Pizza();
    }

    public Pizza getPizza() {
       return pizza;
    }

    public String postPizza(){
       this.pizzaFacade.create(pizza);
       return "theend";
    }
}
